package com.gewu.pm.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 打卡记录数据模型
 */
public class AttendanceRecordBean implements Parcelable {

    private String id;
    private String date; // 日期 2025-01-01
    private String signInTime; // 签到时间 07:00:01
    private String signOutTime; // 签退时间 16:30:01
    private int checkStatus; // 签到状态：0.未打卡、1.正常签到、2.迟到
    private int signOffStatus; // 签退状态：0.未打卡、1.正常签退、2.早退
    private String signInLocation; // 签到地点
    private String signOutLocation; // 签退地点
    private String signInPhotoUrl; // 签到照片
    private String signOutPhotoUrl; // 签退照片
    private String description; // 说明内容
    
    // 下属打卡记录额外字段
    private String userName; // 用户姓名
    private String userAvatar; // 用户头像

    public AttendanceRecordBean() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getSignInTime() {
        return signInTime;
    }

    public void setSignInTime(String signInTime) {
        this.signInTime = signInTime;
    }

    public String getSignOutTime() {
        return signOutTime;
    }

    public void setSignOutTime(String signOutTime) {
        this.signOutTime = signOutTime;
    }

    public int getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(int checkStatus) {
        this.checkStatus = checkStatus;
    }

    public int getSignOffStatus() {
        return signOffStatus;
    }

    public void setSignOffStatus(int signOffStatus) {
        this.signOffStatus = signOffStatus;
    }

    public String getSignInLocation() {
        return signInLocation;
    }

    public void setSignInLocation(String signInLocation) {
        this.signInLocation = signInLocation;
    }

    public String getSignOutLocation() {
        return signOutLocation;
    }

    public void setSignOutLocation(String signOutLocation) {
        this.signOutLocation = signOutLocation;
    }

    public String getSignInPhotoUrl() {
        return signInPhotoUrl;
    }

    public void setSignInPhotoUrl(String signInPhotoUrl) {
        this.signInPhotoUrl = signInPhotoUrl;
    }

    public String getSignOutPhotoUrl() {
        return signOutPhotoUrl;
    }

    public void setSignOutPhotoUrl(String signOutPhotoUrl) {
        this.signOutPhotoUrl = signOutPhotoUrl;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserAvatar() {
        return userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    // Parcelable implementation
    protected AttendanceRecordBean(Parcel in) {
        id = in.readString();
        date = in.readString();
        signInTime = in.readString();
        signOutTime = in.readString();
        checkStatus = in.readInt();
        signOffStatus = in.readInt();
        signInLocation = in.readString();
        signOutLocation = in.readString();
        signInPhotoUrl = in.readString();
        signOutPhotoUrl = in.readString();
        description = in.readString();
        userName = in.readString();
        userAvatar = in.readString();
    }

    public static final Creator<AttendanceRecordBean> CREATOR = new Creator<AttendanceRecordBean>() {
        @Override
        public AttendanceRecordBean createFromParcel(Parcel in) {
            return new AttendanceRecordBean(in);
        }

        @Override
        public AttendanceRecordBean[] newArray(int size) {
            return new AttendanceRecordBean[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(date);
        dest.writeString(signInTime);
        dest.writeString(signOutTime);
        dest.writeInt(checkStatus);
        dest.writeInt(signOffStatus);
        dest.writeString(signInLocation);
        dest.writeString(signOutLocation);
        dest.writeString(signInPhotoUrl);
        dest.writeString(signOutPhotoUrl);
        dest.writeString(description);
        dest.writeString(userName);
        dest.writeString(userAvatar);
    }
}
